//
//  kWnxeXJLCFMineSettingInfoCellhODGKD.m
//  qcb_ios
//
//  Created by Ji on 2018/8/31.
//  Copyright © 2018年 ski. All rights reserved.
//

#import "kWnxeXJLCFMineSettingInfoCellhODGKD.h"

@interface kWnxeXJLCFMineSettingInfoCellhODGKD ()
{
    NSString *_title;
    NSString *_tips;
    NSInteger _row;
}

@property (nonatomic, strong) UILabel *titleLabel;

@property (nonatomic, strong) UILabel *edHyphtipsLabelTVYPVW;

@property (nonatomic, strong) UIImageView *arrow;

@property (nonatomic, strong) UIView *line;

@end

@implementation kWnxeXJLCFMineSettingInfoCellhODGKD

- (void)setWithIndexPath:(NSIndexPath *)indexPath
{
    _title = nil;
    _tips = nil;
    
    NSInteger row = indexPath.row;
    
    _row = row;
    
    NSArray *yIBGmutitleArrEFwoZq = @[@"密码管理", @"我的银行卡", @"收货地址管理"];
    _title = [yIBGmutitleArrEFwoZq safeObjectAtIndex:row];
    
        
    
}

- (void)reloadData
{
    
    if (!self.titleLabel) {
        self.titleLabel = [UILabel new];
        self.titleLabel.textColor = QTZ_Gray102;
        self.titleLabel.font = FONT(13);
        [self addSubview:self.titleLabel];
    }
    
    if (self.titleLabel) {
        self.titleLabel.text = _title;
        [self.titleLabel sizeToFit];
        self.titleLabel.centerY = 19;
        self.titleLabel.left = 25;
    }
    
    if (!self.arrow) {
        self.arrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_list_detail_arrow"]];
        [self.arrow sizeToFit];
        self.arrow.right = FULL_WIDTH - 25;
        self.arrow.centerY = self.titleLabel.centerY;
        [self addSubview:self.arrow];
    }
    
    if (!self.edHyphtipsLabelTVYPVW) {
        self.edHyphtipsLabelTVYPVW = [UILabel new];
        self.edHyphtipsLabelTVYPVW.textColor = QTZ_Gray153;
        self.edHyphtipsLabelTVYPVW.font = FONT(12);
        [self addSubview:self.edHyphtipsLabelTVYPVW];
    }
    
    if (self.edHyphtipsLabelTVYPVW) {
        self.edHyphtipsLabelTVYPVW.textColor = _row == 1 ? Theme_Color : QTZ_Gray153;
        self.edHyphtipsLabelTVYPVW.text = _row == 1 ? ( [self.flFGIcbindCardmirovY isEqualToString:@"1"] ? @"" : @"未绑定") : _tips;
        [self.edHyphtipsLabelTVYPVW sizeToFit];
        self.edHyphtipsLabelTVYPVW.centerY = self.titleLabel.centerY;
        self.edHyphtipsLabelTVYPVW.right = self.arrow.left - 10;
    }
    
    if (!self.line) {
        self.line = [[UIView alloc] initWithFrame:CGRectMake(30, 37, FULL_WIDTH - 60, 1)];
        self.line.backgroundColor = QTZ_Gray237;
        [self addSubview:self.line];
    }
    
    if (self.line) {
        self.line.hidden = _row == 2;
    }
    
}

@end
